package com.sgam.mf.helper;

import com.sgam.mf.domain.sec.SecUser;

public class ProxyCurrentUser {
	
	private Integer userId;	
	
	private String  userFullName;
	
	private Integer  userBranchId;
	
	private String  userBranchName;
	
	private Integer  userRoleId;
	
	private String  userRoleName;
	
	public ProxyCurrentUser() {
		super();
		this.userId 		= -1;
		this.userFullName 	= "Guest";
		this.userBranchId 	= -1;
		this.userBranchName = "";
		this.userRoleId 	= -1;
		this.userRoleName 	= "Guest";
	}
	
	public ProxyCurrentUser(SecUser full) {
		super();
		this.userId = full.getId();
		this.userFullName = full.getFullName();
		this.userBranchId = 	full.getRefBranch().getId();
		this.userBranchName = 	full.getRefBranch().getMdValue();
		this.userRoleId  	= full.getRefRole().getId();
		this.userRoleName 	= full.getRefRole().getMdValue();
	}

	
	public String  toString(){
		String result = "\n ************** \n";
		result = result + "userId 			= " + getUserId() + "\n";
		result = result +  "userFullName 	= " + getUserFullName() + "\n";
		result = result +  "userBranchId 	= " + getUserBranchId() + "\n";
		result = result +  "userBranchName 	= " + getUserBranchName() + "\n";
		result = result +  "userRoleId 		= " + getUserRoleId() + "\n";
		result = result +  "userRoleName  	= " + getUserRoleName() + "\n";
		result = result +  "\n ************** \n";
		return result;
	}
	
	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getUserFullName() {
		return userFullName;
	}

	public void setUserFullName(String userFullName) {
		this.userFullName = userFullName;
	}

	public Integer getUserBranchId() {
		return userBranchId;
	}

	public void setUserBranchId(Integer userBranchId) {
		this.userBranchId = userBranchId;
	}

	public String getUserBranchName() {
		return userBranchName;
	}

	public void setUserBranchName(String userBranchName) {
		this.userBranchName = userBranchName;
	}

	public Integer getUserRoleId() {
		return userRoleId;
	}

	public void setUserRoleId(Integer userRoleId) {
		this.userRoleId = userRoleId;
	}

	public String getUserRoleName() {
		return userRoleName;
	}

	public void setUserRoleName(String userRoleName) {
		this.userRoleName = userRoleName;
	}

	

}
